Plug a memory leak in the css parser
authorMatthias Clasen <mclasen@redhat.com>
Tue, 17 Sep 2013 03:30:57 +0000 (23:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 Sep 2013 03:30:57 +0000 (23:30 -0400)
color_value_parse was leaking a GtkCssSymbolicValue.
Reported in

https://bugzilla.gnome.org/show_bug.cgi?id=702034

gtk/gtkcssstylefuncs.c

index 3a5e10c5a237119a839f82b79cedb84dd17852f9..426d3ee1007cd3ca0037963a1c06a005c30a4bdd 100644 (file)
@@ -256,7 +256,7 @@ rgba_value_compute (GtkStyleProviderPrivate *provider,
   G_GNUC_END_IGNORE_DEPRECATIONS;
 }
 
-static gboolean 
+static gboolean
 color_value_parse (GtkCssParser *parser,
                    GValue       *value)
 {
@@ -278,6 +278,7 @@ color_value_parse (GtkCssParser *parser,
       color.blue = rgba.blue * 65535. + 0.5;
 
       g_value_set_boxed (value, &color);
+      gtk_symbolic_color_unref (symbolic);
     }
   else
     {